OptionRiskFactor
This table contains the up/dn underlier price slides used in OCC risk calculations. Note that these values are computed by SpiderRock using similar methods but may not exactly match OCC values.
METADATA
Attribute | Value |
---|---|
Topic | 1000-analytics |
MLink Token | OptAnalytics |
Product | SRAnalytics |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
okey_at | enum - AssetType | PRI | 'None' | |
okey_ts | enum - TickerSrc | PRI | 'None' | |
okey_tk | VARCHAR(12) | PRI | '' | |
okey_yr | SMALLINT UNSIGNED | PRI, SEC | 0 | |
okey_mn | TINYINT UNSIGNED | PRI, SEC | 0 | |
okey_dy | TINYINT UNSIGNED | PRI, SEC | 0 | |
okey_xx | DOUBLE | PRI | 0 | |
okey_cp | enum - CallPut | PRI | 'Call' | |
ticker_at | enum - AssetType | 'None' | ||
ticker_ts | enum - TickerSrc | 'None' | ||
ticker_tk | VARCHAR(12) | SEC | '' | |
svol | FLOAT | 0 | option surface volatility | |
years | FLOAT | 0 | years to expiration | |
up50 | FLOAT | 0 | underlier up 50 slide | |
dn50 | FLOAT | 0 | underlier dn 50 slide | |
up15 | FLOAT | 0 | underlier up 15 slide | |
dn15 | FLOAT | 0 | underlier dn 15 slide | |
up12 | FLOAT | 0 | underlier up 12 slide | |
dn12 | FLOAT | 0 | underlier dn 12 slide | |
up09 | FLOAT | 0 | underlier up 9 slide | |
dn09 | FLOAT | 0 | underlier dn 9 slide | |
dn08 | FLOAT | 0 | underlier dn 8 slide | |
up06 | FLOAT | 0 | underlier up 6 slide | |
dn06 | FLOAT | 0 | underlier dn 6 slide | |
up03 | FLOAT | 0 | underlier up 3 slide | |
dn03 | FLOAT | 0 | underlier dn 3 slide | |
calcErr | VARCHAR(24) | '' | option pricing error otherwise an empty string | |
calcSource | enum - CalcSource | 'None' | ||
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
okey_tk | 1 |
okey_yr | 2 |
okey_mn | 3 |
okey_dy | 4 |
okey_xx | 5 |
okey_cp | 6 |
okey_at | 7 |
okey_ts | 8 |
SECONDARY INDEX (ExpirationIndex) (Not Unique)
Field | Sequence |
---|---|
okey_yr | 1 |
okey_mn | 2 |
okey_dy | 3 |
SECONDARY INDEX (TickerIndex) (Not Unique)
Field | Sequence |
---|---|
ticker_tk | 1 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRAnalytics`.`MsgOptionRiskFactor` (
`okey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`okey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`okey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`okey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`okey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_xx` DOUBLE NOT NULL DEFAULT 0,
`okey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call',
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`svol` FLOAT NOT NULL DEFAULT 0 COMMENT 'option surface volatility',
`years` FLOAT NOT NULL DEFAULT 0 COMMENT 'years to expiration',
`up50` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 50% slide',
`dn50` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 50% slide',
`up15` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 15% slide',
`dn15` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 15% slide',
`up12` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 12% slide',
`dn12` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 12% slide',
`up09` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 9% slide',
`dn09` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 9% slide',
`dn08` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 8% slide',
`up06` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 6% slide',
`dn06` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 6% slide',
`up03` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 3% slide',
`dn03` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 3% slide',
`calcErr` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'option pricing error, otherwise, an empty string.',
`calcSource` ENUM('None','Tick','Loop') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`okey_tk`,`okey_yr`,`okey_mn`,`okey_dy`,`okey_xx`,`okey_cp`,`okey_at`,`okey_ts`),
KEY `ExpirationIndex` (`okey_yr`,`okey_mn`,`okey_dy`) USING HASH,
KEY `TickerIndex` (`ticker_tk`) USING HASH
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='This table contains the up/dn underlier price slides used in OCC risk calculations. Note that these values are computed by SpiderRock using similar methods but may not exactly match OCC values.';
SELECT TABLE EXAMPLE QUERY
SELECT
`okey_at`,
`okey_ts`,
`okey_tk`,
`okey_yr`,
`okey_mn`,
`okey_dy`,
`okey_xx`,
`okey_cp`,
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`svol`,
`years`,
`up50`,
`dn50`,
`up15`,
`dn15`,
`up12`,
`dn12`,
`up09`,
`dn09`,
`dn08`,
`up06`,
`dn06`,
`up03`,
`dn03`,
`calcErr`,
`calcSource`,
`timestamp`
FROM `SRAnalytics`.`MsgOptionRiskFactor`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`okey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`okey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`okey_tk` = 'Example_okey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`okey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`okey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`okey_dy` = 1
AND
/* Replace with a DOUBLE */
`okey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`okey_cp` = 'Call';
Doc Columns Query
SELECT * FROM SRAnalytics.doccolumns WHERE TABLE_NAME='OptionRiskFactor' ORDER BY ordinal_position ASC;